const {MainWindow} = require('./mainWindow/mainWindow')
const path = require('path')
const {Tray} = require('electron')

function  createTray(app) {
    const iconPath = path.resolve(__dirname,'./public/upload/2e3toucAFh.png')
    const tray = new Tray(iconPath)
    tray.setToolTip('readit')
    tray.on('click',(e)=>{
        console.log('菜单点击事件')
        if(e.shiftKey){
            app.quit()
        }
    })
}

module.exports = createTray